home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 1
/
LSD Compendium Deluxe 1.iso
/
a
/
programming
/
assembly
/
mapsrc.lha
/
macros
/
decback
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1980-02-19
|
286 b
|
21 lines
decback macro ;converts ascii to decimal
;A0 = Source, must end with an
; illegal char. eg 0
;D0 = Answer
moveq #0,d0
moveq #0,d1
.\@hloop
move.b (a0)+,d1
sub.b #"0",d1
cmp.b #10,d1
bcc .\@decinok
mulu #10,d0
add.b d1,d0
bra .\@hloop
.\@decinok
endm